<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8" />
<title>商品管理 - 编辑分类</title>
<?php include($this->c['_homes']['_viewsHome'].'/_global/_head.php');?>
</head>
<!-- BEGIN BODY -->
<body class="page-header-fixed page-sidebar-fixed">
<!-- BEGIN HEADER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/head.php');?>
<!-- END HEADER -->
<div class="clearfix"></div>
<!-- BEGIN CONTAINER -->
<div class="page-container" > 
  <!-- BEGIN HORIZONTAL MENU PAGE SIDEBAR1 -->
  <?php include($this->c['_homes']['_viewsHome'].'/_global/menu.php');?>
  <!-- END BEGIN HORIZONTAL MENU PAGE SIDEBAR --> 
  <!-- BEGIN PAGE -->
  <div class="page-content"> 
    <!-- BEGIN PAGE HEADER-->
    <div class="row">
      <div class="col-md-12"> 
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title"> 编辑分类 </h3>
        <ul class="page-breadcrumb breadcrumb">
          <li> <i class="icon-home"></i> <a href="/manage">后台</a> <i class="icon-angle-right"></i> </li>
          <li> 商品管理 <i class="icon-angle-right"></i> </li>
          <li> <a href="/channel/category">商品分类</a> <i class="icon-angle-right"></i> </li>
          <li>编辑分类</li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB--> 
      </div>
    </div>
    <!-- END PAGE HEADER--> 
    <!-- BEGIN PAGE CONTENT-->
    
    <div class="row">
      <div class="col-md-6"> 
        <!-- BEGIN SAMPLE FORM PORTLET-->
        <div class="portlet box blue">
          <div class="portlet-title">
            <div class="caption"> <i class="icon-reorder"></i> 基本信息 </div>
            <div class="tools"> <a href="" class="collapse"></a> </div>
          </div>
          <div class="portlet-body form">
            <form method="post" action="catedo" onSubmit="return chkfrm();" enctype="multipart/form-data">
              <input type="hidden" name="act" value="edit" />
              <input type="hidden" name="caid" value="<?=$this->cate['caid'];?>" />
              <div class="form-body">
                <div class="form-group">
                  <label >中文名称</label>
                  <div class="input-group">
                    <input type="text" class="form-control" name="name" value="<?=$this->cate['name'];?>" maxlength="20" id="_name">
                  </div>
                  <span class="help-block">20个汉字以内</span> 
                </div>
                <div class="form-group">
                  <label >英文名称</label>
                  <div class="input-group">
                    <input type="text" class="form-control" name="names" value="<?=$this->cate['names'];?>" maxlength="20">
                  </div> 
                </div>                
                <hr>
                <div class="form-group">
                  <label >所属父类</label>
                  <div class="input-group">
                    <select class="form-control" name="fucaid">
                      <option value="0">无父类</option>
                      <?php
								 if($this->data[0]){
									 foreach($this->data[0] as $r){				
									 	if($this->cate['fucaid']==$r['caid']) $slk=' selected';
										else $slk='';
										 ?>
                      <option value="<?=$r['caid'];?>"<?=$slk;?>>
                      <?=$r['name'];?>
                      </option>
                      <?
									 }
								 }
								 ?>
                    </select>
                  </div>
                </div>
                <hr>
                </hr>
                <div class="form-group">
                    <label>分类图标</label>
                    <div class="input-group">
                      <input id="exampleInputFile1" name="pic_big" type="file">
                      <p class="help-block">只允许上传JPG图片，2M以内</p>
                       <?php if($this->cate['docid']>0){ foreach($this->cate['docid'] as $v){ ?>
                          <p>图片已经存在，<a href="<?=$v;?>" target="_blank">点击查看&gt;&gt;</a></p>
					  <?
                      }
					  }
                      ?>
                    </div>
                  </div>
                <hr>
                <div class="form-group">
                    <label>分类广告</label>
                    <div class="input-group">
                      <input id="exampleInputFile1" name="pic_img" type="file">
                      <p class="help-block">只允许上传JPG图片，2M以内</p>
                       <?php if($this->cate['addocid']>0){ foreach($this->cate['addocid'] as $v){ ?>
                          <p>图片已经存在，<a href="<?=$v;?>" target="_blank">点击查看&gt;&gt;</a></p>
            <?
                      }
            }
                      ?>
                    </div>
                  </div>
                </hr>
                
                <div class="form-group">
                  <label>状态</label>
                  <div class="radio-list">
                    <label class="radio-inline">
                    <div id="uniform-optionsRadios4" class="radio"><span class="">
                      <input name="stat" id="optionsRadios4" value="1"<?=$this->stat[1];?> type="radio">
                      </span></div>
                    <span class="label label-success">正常</span>
                    </label>
                    <label class="radio-inline">
                    <div id="uniform-optionsRadios5" class="radio"><span>
                      <input name="stat" id="optionsRadios5" value="2"<?=$this->stat[2];?> type="radio">
                      </span></div>
                    <span class="label label-danger">禁用</span>
                    </label>
                    <label class="radio-inline">
                    <div id="uniform-optionsRadios5" class="radio"><span>
                      <input name="stat" id="optionsRadios5" value="3" type="radio">
                      </span></div>
                    <span class="label label-default">删除</span>
                    </label>
                  </div>
                </div>
                              </div>
              <div class="form-actions">
                <input type="submit" class="btn blue" value="提 交">
              </div>
            </form>
          </div>
        </div>
        <!-- END SAMPLE FORM PORTLET--> 
        
      </div>
    </div>
    <!-- END PAGE CONTENT--> 
  </div>
  <!-- END PAGE --> 
</div>
<!-- END CONTAINER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/_footer.php');?>
<script>
	jQuery(document).ready(function() {    
	   App.init();
	});
</script> 
<script type="text/javascript">
function chkfrm(){
	if($("#_name").prop("value")==""){
		alert("请填写分类名称");
		$("#_name").focus();
		return false;
	}	
}
</script> 
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>